package cn.nit.blog.mapper;

import cn.nit.blog.dto.CommentDto;
import cn.nit.blog.dto.IndexDataDto;
import cn.nit.blog.dto.MyPage;
import cn.nit.blog.entity.Post;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author wjx
 * @since 2023-03-24
 */
public interface PostMapper extends BaseMapper<Post> {

    public MyPage<IndexDataDto> indexPostVo(@Param("page") MyPage<IndexDataDto> page, @Param("orderMode") Integer orderMode);

    IndexDataDto findPostDetail(Integer id);

    List<CommentDto> getCommentListByPostId(Integer id);
}
